
package com.wzn.service;

import com.sun.xml.internal.ws.api.message.ExceptionHasMessage;
import com.wzn.respository.OrderRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class OrderServiceImpl implements OrderService {
    
    @Resource
    private OrderRepository orderRepository;
    
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void insert() {
        try {
            orderRepository.insert();
        } catch (final Exception ex) {
            ex.printStackTrace();
        }
    }
    
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void delete() {
        orderRepository.delete();
    }
    
    @Override
    public void select() {
        orderRepository.select();
    }
}
